/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * Principal.java
 *
 * Created on 01-abr-2013, 22:21:29
 */
package jumavidesktop.GUI.Principal;

import java.awt.Dimension;
import jumavidesktop.Manejadores.Intefaces.INotificadoMatricula;
import jumavidesktop.Persistencia.entidades.Movimientos;
/**
 *
 * @author kjh
 */
public class Ventana_Lista extends javax.swing.JInternalFrame implements INotificadoMatricula {
    public enum Mensaje{SALIDA,ENTRADA};
    
    @Override
    public void detectadaMatricula(Movimientos mv) {
        this.interno_Scroll.add(new Aux_Lista(mv));
    }

    public Ventana_Lista() {
        super("Registro de Movimientos");
        this.setVisible(true);
        initComponents();
        this.setLocale(null);
        quitarIconos();
        this.interno_Scroll.add(panelSup());
    }
        
    public Ventana_Lista(Dimension a){
        this();
        this.setSize(a);
    }
    
    public Aux_Lista panelSup(){
        Aux_Lista panel = new Aux_Lista();
        panel.setSal("Ent/Sal");
        panel.setCam("Cámara");
        panel.setMat("Matrícula");
        panel.setHora("Fecha y Hora");
        panel.setId("Nº Operación");
        return panel;
    }
    
    private void quitarIconos(){
        this.setIconifiable(false);
        this.setMaximizable(false);
        this.setClosable(false);
        this.setResizable(true);
        this.setVisible(true);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panel_Inf = new javax.swing.JPanel();
        panel_Scroll = new javax.swing.JScrollPane();
        interno_Scroll = new javax.swing.JPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(250, 63));
        setName("Form"); // NOI18N

        panel_Inf.setName("panel_Inf"); // NOI18N
        panel_Inf.setLayout(new java.awt.BorderLayout());

        panel_Scroll.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        panel_Scroll.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        panel_Scroll.setName("panel_Scroll"); // NOI18N

        interno_Scroll.setName("interno_Scroll"); // NOI18N
        interno_Scroll.setLayout(new javax.swing.BoxLayout(interno_Scroll, javax.swing.BoxLayout.Y_AXIS));
        panel_Scroll.setViewportView(interno_Scroll);

        panel_Inf.add(panel_Scroll, java.awt.BorderLayout.CENTER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panel_Inf, javax.swing.GroupLayout.DEFAULT_SIZE, 562, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panel_Inf, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel interno_Scroll;
    private javax.swing.JPanel panel_Inf;
    private javax.swing.JScrollPane panel_Scroll;
    // End of variables declaration//GEN-END:variables
}
